package com.yiwyn.demo.service;

import com.yiwyn.demo.base.CacheUtils;
import com.yiwyn.demo.domain.SUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class TestService {

    @Autowired
    private CacheUtils cacheUtils;


    
    public String test() {

        log.info("cache context : {}", cacheUtils.cache.asMap());

        SUser sUser = cacheUtils.get("2", SUser.class);

        return sUser.toString();
    }

}
